import React from 'react'
import {NavLink} from 'react-router-dom'
import BattlePad from '../record/BattlePad2'

class Rule extends React.Component<any, any> {
  public constructor(props) {
    super(props)
    this.state = {
    }
  }

  public componentDidMount() {

  }

  public openBattlePage(gameData) {
    console.log('gameData', gameData);
    const toLink = `/RulesDetail/${gameData.gameType}/${gameData.gameName}`;
    window.location.hash = encodeURI(toLink);
  }

  public render() {
    console.log(this.props)
    const {inviteId, tip} = this.state
    return <div className="view-page center-view">
      <div className="record-top text-center">
        {/* <img src="img/app/jiutian-hy-text.png" className="service-title animated infinite" alt="" /> */}
      </div>
      <div className="record-middle-larger">
        <BattlePad gameClicked={this.openBattlePage.bind(this)}></BattlePad>
      </div>
      <div className="usercenter-bottom">
        <img className="bar-half" src="img/userCenter/methods-bottom.png" alt=""/>
        <img className="user-bottom-bg" src="img/userCenter/user-bottom-bg.png" alt=""/>
        <NavLink to="/UserCenter"><img className="back" src="img/userCenter/user-back.png" alt=""/></NavLink>
      </div>
    </div>
  }

}

export default Rule